<script src="http://open.web.meitu.com/sources/xiuxiu.js" type="text/javascript"></script>
<script type="text/javascript">
    window.onload=function(){
      /*第1个参数是加载编辑器div容器，第2个参数是编辑器类型，第3个参数是div容器宽，第4个参数是div容器高*/
      xiuxiu.embedSWF("altContent",5,"650px","420px");
      //修改为您自己的图片上传接口
      xiuxiu.setUploadURL("http://<?php echo $_SERVER['HTTP_HOST']; ?>{:U('Index/settings/upload')}");
      xiuxiu.setUploadType(2);
      xiuxiu.setUploadDataFieldName("upload_file");
      xiuxiu.onInit = function ()
      {
        xiuxiu.loadPhoto("http://<?php echo $_SERVER['HTTP_HOST'].'__ROOT__'.$_SESSION['face']; ?>");//修改为要处理的图片url
      }
      xiuxiu.onUploadResponse = function (data)
      {
        // 动态的去改变公共layout那个头像
      }
    }
</script>




        <div class="wrap">
            <div class="container">
                <div class="row">
                    <div id="secondary" class="col-md-2">
                        <nav class="list-group mt30">
                            <a href="{:U('index/settings/index')}" class="list-group-item ">
                                个人资料
                            </a>

                            <a  href="{:U('index/settings/face')}"
                            class="list-group-item active">
                                头像修改
                                <i style="line-height: 20px;font-size: 12px;color: #999;" class="pull-right fa fa-external-link-square">
                                </i>
                            </a>
                            <a href="https://segmentfault.com/user/settings?tab=mail" class="list-group-item">
                                Email 地址
                            </a>
                            <a href="https://segmentfault.com/user/settings?tab=password" class="list-group-item">
                                密码修改
                            </a>
                            <a href="https://segmentfault.com/user/settings?tab=oauth" class="list-group-item">
                                第三方账号
                            </a>
                        </nav>
                        <nav class="list-group mt30">
                            <a href="https://segmentfault.com/user/settings?tab=notify" class="list-group-item">
                                通知和私信
                            </a>
                            <a href="https://segmentfault.com/user/settings?tab=card" class="list-group-item">
                                个性名片
                            </a>
                            <a href="https://segmentfault.com/user/settings?tab=block" class="list-group-item">
                                屏蔽名单
                            </a>
                            <a href="https://segmentfault.com/user/settings?tab=lab" class="list-group-item">
                                实验室功能
                            </a>
                        </nav>
                    </div>
                    <!-- end #secondary -->
                    <div id="main" class="settings col-md-10 form-horizontal">
                        <h2 class="h3 mt30 post-title">
                            头像修改
                        </h2>
                        <div class="row mt30">
                            <div class="col-md-3 col-md-push-9">
                                
                            </div>
                            <div class="col-md-8 col-md-pull-3">
                                <div id='altContent'></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        